﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TuoShouTP.aspx.cs" Inherits="Web.Pages.YongShui._6.ZhangWuGL.TuoShouTP" Theme="Default" ValidateRequest="false" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>托收退票</title>
    <link href="../../../css/inputBgColor.css" rel="stylesheet" />
    <script src="../../../JS/jquery.js"></script>
    <script src="../../../JS/AddEditCancel.js"></script>
    <style type="text/css">
        td {
            white-space:nowrap;
        }
    </style>
    <script type="text/javascript">
        function EnterSelect()
        {
           
            if (event.keyCode == 13)
            {
                if (txtYongHuH.GetText() == "")
                {
                    txtYongHuH.Focus();
                }
                else if (txtSHuiLianNY.GetText() == "") {
                    txtSHuiLianNY.Focus();
                }
                else {
                    CallBackControl.PerformCallback("select");
                }
               
            }
        }
        function CallBack(rs)
        {
            var list = rs.split('|');
            var code = list[1];
            var msg = list[2];
            var keyword = list[0];
            if (keyword == "select")
            {
                if (code > 0) {
                    var yonghum = list[3];
                    var slny = list[4];
                    var kaihum = list[5];
                    var zhanghao = list[6];
                    var yinghang = list[7];
                    var jine = list[8];
                    var pzh = list[9];

                    txtYongHuM.SetText(yonghum);
                    txtShuiLiangNY2.SetText(slny);
                    txtKaiHuHM.SetText(kaihum);
                    txtKaiHuZH.SetText(zhanghao);
                    txtKaiHuYH.SetText(yinghang);
                    txtJinE.SetText(jine);

                    HidValues.Set("YongHuH", txtYongHuH.GetText());
                    HidValues.Set("TUOSHOUPZH", pzh);
                }
                else {
                    ClearInfo();
                    alert(msg);
                }
            }
            else if (keyword == "queren")
            {                
                if (code > 0) {
                    CallBackControl.PerformCallback("tuipiaotj");
                }
                else {
                    alert(msg);
                }
            }
            else if (keyword == "quxiao") {
                if (code > 0) {
                    CallBackControl.PerformCallback("qxtuipiaotj");
                }
                else {
                    alert(msg);
                }
            }
            else if (keyword == "tuipiaotj") {
               
                    alert(msg);
                    CLearAll();
            }
            else if (keyword == "qxtuipiaotj") {
                
                    alert(msg);
                    CLearAll();
            }
        }
        function QueRen()
        {
            CallBackControl.PerformCallback("queren");
        }
        function QuXiao() {
            if (txtYongHuH.GetText() == "")
            {
                CLearAll();
                txtYongHuH.Focus();
                return;
            }
            CallBackControl.PerformCallback("quxiao");
        }
        function CLearAll()
        {
            HidValues.Clear();
            txtSHuiLianNY.SetText("");
            txtYongHuM.SetText("");
            txtShuiLiangNY2.SetText("");
            txtKaiHuHM.SetText("");
            txtKaiHuZH.SetText("");
            txtKaiHuYH.SetText("");
            txtJinE.SetText("");
        }
        function ClearInfo()
        {
            txtSHuiLianNY.SetText("");
            txtYongHuM.SetText("");
            txtShuiLiangNY2.SetText("");
            txtKaiHuHM.SetText("");
            txtKaiHuZH.SetText("");
            txtKaiHuYH.SetText("");
            txtJinE.SetText("");
        }
        function OpenCX()
        {
            openCenter("TuoShouTPCX.aspx", "800px", "700px");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <div class="tabletitle1" align="center">
            托收退票
        </div>
        <div style="display:none">
             <dx:ASPxButton ID="ASPxButton1" ClientInstanceName="BtnQR" runat="server" Text="确认"  OnClick="btnQueRen_Click" UseSubmitBehavior="false">
                                        
                                    </dx:ASPxButton>
            <dx:ASPxButton ID="ASPxButton2" ClientInstanceName="BtnQX" runat="server" Text="取消退票"  OnClick="btnQuXiaoTP_Click" UseSubmitBehavior="false">
                                        
                                    </dx:ASPxButton>
        </div>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                <dx:ASPxHiddenField ID="HidValues" ClientInstanceName="HidValues" runat="server"></dx:ASPxHiddenField>
                <dx:ASPxCallback ID="CallBackControl" ClientInstanceName="CallBackControl"  OnCallback="CallBackControl_Callback" ClientSideEvents-CallbackComplete="function(s,e){CallBack(e.result);}" runat="server"></dx:ASPxCallback>
                <div style="width: 500px; height: auto; text-align: center; margin: 0px auto;">
                    <div style="">
                        <table align="center" style="height: 60px; width: 100%;">
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">用户号：</span></td>
                                <td>
                                    <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="txtYongHuH" Width="40%" runat="server" >
                                        <ClientSideEvents KeyDown="function(s,e){EnterSelect();}" />
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">水量年月：</span></td>
                                <td>
                                    <dx:ASPxTextBox ID="txtShuiLiangNY" ClientInstanceName="txtSHuiLianNY" Width="40%" runat="server" Enabled="true">
                                     <ClientSideEvents KeyDown="function(s,e){EnterSelect();}" />
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </div>
                    <hr />
                    <div style="">
                        <table align="center" style="height: 180px; width: 100%;">
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">用户名：</span></td>
                                <td colspan="2">
                                    <dx:ASPxTextBox ID="txtYongHuM" ClientInstanceName="txtYongHuM" Width="100%" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">水量年月：</span></td>
                                <td>
                                    <dx:ASPxTextBox ID="txtShuiLiangNY2" ClientInstanceName="txtShuiLiangNY2" Width="40%" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">开户户名：</span></td>
                                <td colspan="2">
                                    <dx:ASPxTextBox ID="txtKaiHuHM" ClientInstanceName="txtKaiHuHM" Width="100%" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">开户帐号：</span></td>
                                <td colspan="2">
                                    <dx:ASPxTextBox ID="txtKaiHuZH" ClientInstanceName="txtKaiHuZH" Width="100%" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">开户银行：</span></td>
                                <td colspan="2">
                                    <dx:ASPxTextBox ID="txtKaiHuYH" Width="100%" ClientInstanceName="txtKaiHuYH" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">金额：</span></td>
                                <td>
                                    <dx:ASPxTextBox ID="txtJinE" Width="40%" ClientInstanceName="txtJinE" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </div>
                    <hr />
                    <div>
                        <table align="center" style="height: 60px; width: 100%;">
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">退票日期：</span></td>
                                <td>
                                    <dx:ASPxTextBox ID="txtTuiPiaoRQ" Width="40%" runat="server" disabled="disabled" ForeColor="#c0c0c0">
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                            </tr>
                            <tr>
                                <td style="text-align:right"><span style="font-size: 12px;text-align:right">退票原因：</span></td>
                                <td >
                                    <asp:Panel runat="server" ID="Panel1">
                                        <dx:ASPxComboBox runat="server" ID="cmbTuiPiaoYY" Width="100px">
                                            <Items>
                                                <dx:ListEditItem Text="用户拒付" Value="0" Selected="true" />
                                               <%-- <dx:ListEditItem Text="存款不足" Value="1" />
                                                <dx:ListEditItem Text="账户不符" Value="2" />
                                                <dx:ListEditItem Text="老账号停用" Value="3" />
                                                <dx:ListEditItem Text="无此账户" Value="4" />
                                                <dx:ListEditItem Text="此户已销" Value="5" />
                                                <dx:ListEditItem Text="结户" Value="6" />
                                                <dx:ListEditItem Text="此户结清" Value="7" />
                                                <dx:ListEditItem Text="此户冻结" Value="8" />
                                                <dx:ListEditItem Text="大小写不规范" Value="9" />
                                                <dx:ListEditItem Text="书写不规范" Value="10" />
                                                <dx:ListEditItem Text="情况不明" Value="11" />
                                                <dx:ListEditItem Text="无款" Value="12" />
                                                <dx:ListEditItem Text="交换号停用" Value="13" />--%>
                                            </Items>
                                        </dx:ASPxComboBox>
                                    </asp:Panel>
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </div>
                    <hr />
                    <div>
                        <table align="right">
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="btnQueRen" runat="server" Text="确认" AutoPostBack="false" UseSubmitBehavior="false">
                                        <ClientSideEvents Click="function(s,e){QueRen();}" />
                                    </dx:ASPxButton>

                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnYiTuoSTPCX" runat="server" Text="已托收退票查询"  AutoPostBack="false" UseSubmitBehavior="false">
                                     <ClientSideEvents Click="function(s,e){OpenCX();}" />
                                    </dx:ASPxButton>

                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnQuXiaoTP" runat="server" Text="取消退票"  AutoPostBack="false" UseSubmitBehavior="false">
                                        <ClientSideEvents Click="function(s,e){QuXiao();}" />
                                         </dx:ASPxButton>

                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
